package com.auction.controller;

import com.auction.common.core.controller.MyBaseController;
import com.auction.common.dao.bean.PageResult;
import com.auction.common.utils.ReturnResult;
import com.auction.service.TransactionLogService;
import com.auction.util.TranQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/tran")
@Api(tags = "流水")
public class TransactionLogController extends MyBaseController {

    @Autowired
    private TransactionLogService transactionLogService;

    @PostMapping("/query")
    @ApiOperation("流水列表")
    public ReturnResult query(@RequestBody TranQuery tranQuery) {
        PageResult result =  transactionLogService.getTraList(tranQuery);
        return success("流水列表",result);
    }

}
